import { Schema } from './schema';
import { Rule, chain } from '@angular-devkit/schematics';
import { createLessFiles, updateStyleConfig } from './init-styles';
import { updateAppModule } from './update-appmodule';
import { updateIndex } from './update-index';
import { updateAppComponent } from './update-appcomponent';

// Just return the tree
export function ngAdd(options: Schema): Rule {
  return chain([
    createLessFiles(options),
    updateStyleConfig(options),
    updateAppModule(options),
    updateIndex(options),
    updateAppComponent(options),
  ]);
}
